<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/7/21
 * Time: 16:55
 */
header("Content-Type: text/plain;charset=utf-8");
header("Access-Control-Allow-Origin:*");
header("Access-Control-Methods:POST,GET");

require_once('../../../com/dao/userDao.php');

//查询管理员
$userDao = new UserDao();
$query = $userDao ->selectAll();
while($userResult = mysqli_fetch_assoc($query)){
    $result[] = $userResult;//将结果一条条存入
}

echo json_encode($result,JSON_UNESCAPED_UNICODE);